import React, { Component } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { Scene, Actions, Stack } from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/MaterialIcons';
import styles from './style';

class Entries extends Component {
  render() {
    return (
      <View style={styles.wrap}>
        <View style={styles.top} />
        <View style={styles.bottom}>
          <View style={styles.entries}>
            <View style={styles.entry}>
              <TouchableOpacity
                style={styles.icon}
                onPress={() =>
                  Actions.createCustomerBase({ from: Actions.currentScene })
                }
              >
                <Icon name="person-add" color="#f00" size={24} />
              </TouchableOpacity>
              <Text>新增客户</Text>
            </View>
            <View style={styles.entry}>
              <TouchableOpacity
                style={styles.icon}
                onPress={() => Actions.checkCustomer()}
              >
                <Icon name="playlist-add" color="#f60" size={24} />
              </TouchableOpacity>
              <Text>新增任务</Text>
            </View>
          </View>
          <View style={styles.backBtn}>
            <TouchableOpacity onPress={Actions.pop} style={styles.backBtnItem}>
              <Icon name="clear" size={32} />
            </TouchableOpacity>
          </View>
        </View>
      </View>
    );
  }
}
module.exports = <Scene key="tabBarCenterBtnEntries" component={Entries} />;
